home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
comm
/
cnet
/
cnet_wof.lha
/
InstallWOF
< prev
next >
Wrap
Text File
|
1998-01-04
|
18KB
|
436 lines
/**************************************************************************\
$VER: WOF Install, v6.52 (3-Jan-97) by Dotoran of Frontiers!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
if left(upper(fp),3)~="RAM" then do;se "Reloading to RAM:..."
call setclip('wofinstall',df);tr "#4copy "df"InstallWOF RAM:}"
tr "#0ram:InstallWOF}";exit;end;else df=getclip('wofinstall')
changewhere "InstallWOF";key=" <KEY>g1";gu 23;port=result;lha="C:LHA"
mview="SYS:UTILITIES/MULTIVIEW";guide="SYS:UTILITIES/AMIGAGUIDE"
/* <gu 2407202;oc=result> is the Old Default System Color */
se "f1c7";gu 2407202;oc=result;setobject "7";putuser 2407202
CHECKARC:
if ~exists(df"wof.lha") then do
se "n1 To correctly install and/or update Wheel of Fortune, this "
se "Install script MUST be located in the SAME path as the included "
se "`wof.lha' archive. Presently, I could NOT find `"df"wof.lha' on "
se "your system. Please remedy this situation, then try running this "
se "script again!"key;exit;end
CHECKLHA:
if ~exists(lha) then do
se "n1 This installation procedure makes use of your LHA program, "
tr "however I could not locate it at `"lha"'...n1"
se "Please enter full PATH/FILENAME to your `LHA' program below:"
se "n1>L1305640#"lha"}I16388 40}";gu 70;lha=result;signal CHECKLHA
end
CHECKGUIDE:
if ~exists(mview) & ~exists(guide) then do
se "n1 This installation procedure makes use of either the MultiView "
se "or the AmigaGuide file for automatic guide viewing at the end of the "
se "script, however I could NOT locate either of these programs in your "
tr "`SYS:UTILITIES/' directory...n1"
se "Please enter full PATH/FILENAME to one of these files below:"
se "n1>L1305640#"mview"}I16388 40}";gu 70;a=result
if find(upper(a),"MULTI")>0 then mview=a
if find(upper(a),"AMIGA")>0 then guide=a;signal CHECKGUIDE
end
view=exists(mview)*1;if view=0 then view=exists(guide)*2
tr 'f1@4n1The Wheel of Fortune, v6.52 Install/Update Script:n1'
se ' Hello and welcome to Wheel of Fortune! This script allows you to '
se 'do one of the following. Please choose the option which best suits '
tr 'your present needs:n1'
tr '1. Update WOF, v6.46 (or v6.46a) to v6.52...n1'
tr '2. Install WOF, v6.52 for the first time.....n1'
se 'Use which option? [ABORT]: ';gc;a=result
if a<1 | a>2 | datatype(a,'n')=0 then do;tr 'ABORT';signal QUIT;end
if a=1 then do;tr 'Update';signal UPDATE;end
if a=2 then do;tr 'Install';signal INSTALL;end
UPDATE:
se "n1 You have just selected to update The Wheel of Fortune, v6.46(a) "
se "to the new Wheel of Fortune, v6.52. Is this correct? [Yes]: "
gc;a=result;if a="N" then do;tr "No.";signal CHECKLHA;end;else tr "Yes!"
UPDATE1:
se "n1 Before we begin this update, I need to know WHERE you placed "
se "the 6.46(a) version of Wheel of Fortune. Please specify it's location "
tr "below: (Clear the text and press ENTER to Abort)n1"
se "Enter the path in which you stored Wheel of Fortune, v6.46(a) below:"
se "n1>L1305640#DOORS:}I16388 40}";gu 70;path=result
if path="" then do ; tr "Abort" ; signal QUIT ; end
if ~exists(path"WoFortune") | word(statef(path"WoFortune"),1)~="DIR" then do
se "n1 I'm sorry, but I could NOT locate the `"path"WoFortune/' "
tr "directory you specified above. Please check your typing."key
signal UPDATE1
end
if index(":/",right(path,1))=0 then path=path"/"
opath=path"WoFortune/"
if ~exists(opath"Config.Data") then do
se "n1 Hmmm, I can't seem to find the `"opath"Config.Data' file. Are "
tr "you SURE you're using Wheel of Fortune, v6.46(a) presently?"key
signal UPDATE1
end
call open(f1,opath"Config.Data","r");a=readln(f1);call close(f1)
if substr(word(a,2),2)<6.46 then do
se "n1 You are presently using The Wheel of Fortune, "word(a,2)", "
se "however you NEED to be using v6.46(or v6.46a) before you'll "
se "be able to update to The Wheel of Fortune, v6.52. You could also "
tr "opt to install for the first time. The choice is yours!";signal QUIT
end
tr "n1Present Wheel of Fortune Setup:n1"
asc=exists(opath"Game.ASC");ans=exists(opath"Game.ANS")
ibm=exists(opath"Game.IBM");reg=exists(opath"Reg.Key")
se " Installed Asc Version: "left(word("No Yes",asc+1),10)
tr "Installed Ans Version: "word("No Yes",ans+1)"n1"
se " Installed IBM Version: "left(word("No Yes",ibm+1),10)
tr "Installed Reg Version: "word("No Yes",reg+1)
if asc+ans+ibm<3 then do
se "n1 I notice you are not using ALL the modules currently. Do you "
se "wish to only update the modules you are currently using? [No]: "
gc;a=result;if a="Y" then do;tr "Yes!";update=1;end
else do;tr "No.";update=2;end
end
else update=1
se "n1 In order to be absolutely sure this update is successful, I'll "
se "rename your existing `"opath"' directory as `"strip(opath,'t','/')
se "646/'. In the event this update does NOT work for you, you'll be "
se "able to revert back to the earlier version until a fix can be found."
if exists(strip(opath,'t','/')"646") then
address command "rename "strip(opath,'t','/')"646 "strip(opath,'t','/')"646(old)"
address command "rename "strip(opath,'t','/')" "strip(opath,'t','/')"646"
se key"n1";call UNPACKWOF;opath=strip(opath,'t','/')"646/";signal UPDATE_ENTRY
UPDATE2:
se " Various internal directory changes have been made in this new "
se "version of Wheel of Fortune. A new `Texts/' directory now exists in "
se "the `"path"' directory that will house all the textual data files "
tr "used in the game. Copying over your current files now..."key
se "n1Bankers..."
if exists(opath"Bankers") then
tr "#4copy "opath"Bankers "path"Texts/Bankers}ok"
else tr "missing."
se "BMillionaires..."
if exists(opath"BMillionaires") then
tr "#4copy "opath"BMillionaires "path"Texts/BMillionaires}ok"
else tr "missing."
se "BWinner..."
if exists(opath"BWinner") then
tr "#4copy "opath"BWinner "path"Texts/BWinner}ok"
else tr "missing."
se "BWinners..."
if exists(opath"BWinners") then
tr "#4copy "opath"BWinners "path"Texts/BWinners}ok"
else tr "missing."
se "LastPlayer..."
if exists(opath"LastPlayer") then
tr "#4copy "opath"LastPlayer "path"Texts/LastPlayer}ok"
else tr "missing."
se "LastReset..."
if exists(opath"LastReset") then
tr "#4copy "opath"LastReset "path"Texts/LastReset}ok"
else tr "missing."
lv="ASC ANS IBM" ; lt="OLD NEW"
do i=1 to 3
do j=1 to 2
ln="Log."word(lt,j)"."word(lv,i) ; se ln"..."
if exists(opath||ln) then tr "#4copy "opath||ln" "path"Texts/"ln"}ok"
else tr "missing."
end j
end i
se "Millionaires..."
if exists(opath"Millionaires") then
tr "#4copy "opath"Millionaires "path"Texts/Millionaires}ok"
else tr "missing."
se "NewPuz..."
if exists(opath"NewPuz") then
tr "#4copy "opath"NewPuz "path"Texts/NewPuz}ok"
else tr "missing."
se "Stats..."
if exists(opath"Stats") then
tr "#4copy "opath"Stats "path"Texts/Stats}ok"
else tr "missing."
se "Winner..."
if exists(opath"Winner") then
tr "#4copy "opath"Winner "path"Texts/Winner}ok"
else tr "missing."
se "Winners..."
if exists(opath"Winners") then
tr "#4copy "opath"Winners "path"Texts/Winners}ok"
else tr "missing."
se "n1 The `GameData', `Players', and `Config.Data' files have all "
se "received additions in this version as well. Also, the `Config.Data' "
se "file has been renamed `!Settings' and sits in the `"path"' directory, "
se "instead of inside the `"path"Texts/' directory. Converting these "
tr "files now..."ke